package o;

import android.view.View;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import o.fkp.e;

public class SkinnableView {
    private WeakReference<View> ˋ;
    private fmo ˎ;
    private boolean ˏ;
    private List<SkinAttr> ॱ = new ArrayList();

    public void ˎ(boolean z) {
        if (!fmr.ˋ(this.ॱ)) {
            for (SkinAttr o_fko : this.ॱ) {
                View ˋ = ˋ();
                if (!(ˋ == null || o_fko.ʻ)) {
                    o_fko.ˎ(ˋ, z);
                }
            }
        }
    }

    public void ˊ() {
        View ˋ = ˋ();
        if (ˋ != null && this.ˏ && this.ˎ != null) {
            this.ˎ.ˏ(ˋ);
        }
    }

    public View ˋ() {
        if (this.ˋ != null) {
            return (View) this.ˋ.get();
        }
        return null;
    }

    public void ˋ(View view) {
        Object tag = view.getTag(e.ˋ);
        if (tag != null && (tag instanceof String)) {
            if ("hwThemeServiceEnable".equals((String) tag)) {
                this.ˏ = true;
            }
        }
        this.ˋ = new WeakReference(view);
    }

    public List<SkinAttr> ˏ() {
        return this.ॱ;
    }

    public fmo ˎ() {
        return this.ˎ;
    }

    public void ˎ(fmo o_fmo) {
        this.ˎ = o_fmo;
    }

    public void ॱ() {
        if (!fmr.ˋ(this.ॱ)) {
            for (SkinAttr ˋ : this.ॱ) {
                ˋ.ˋ(true);
            }
            this.ॱ.clear();
        }
    }

    public String toString() {
        View ˋ = ˋ();
        return "SkinnableView [view=" + (ˋ != null ? ˋ.getClass().getSimpleName() : "Unknow") + ", attrs=" + this.ॱ + "]";
    }

    public int hashCode() {
        return super.hashCode();
    }

    public boolean equals(Object obj) {
        if (obj instanceof SkinnableView) {
            SkinnableView o_fkw = (SkinnableView) obj;
            if (super.equals(obj)) {
                return true;
            }
            View ˋ = ˋ();
            View ˋ2 = o_fkw.ˋ();
            if (!(ˋ == null || ˋ2 == null || !ˋ.equals(ˋ2))) {
                return true;
            }
        }
        return false;
    }
}
